﻿namespace LayoutGridview.ViewModels
{
    using System.Collections.ObjectModel;
    using System.Linq;
    using LayoutGridview.Models;
    using LayoutGridview.Helpers;

    public class GridView03ViewModel : BindableBase
    {
        public GridView03ViewModel()
        {
            // design-time data
            this.m_Data = new ObservableCollection<SimpleData>(SampleData.GenerateSampleItems());

            // select which are larger
            foreach (var item in this.Data.Where(x => x.Index % 5 == 0))
            {
                item.Hero = true;
                item.ColSpan = 2;
                item.RowSpan = 4;
            }
        }

        ObservableCollection<SimpleData> m_Data = null;
        public ObservableCollection<SimpleData> Data { get { return this.m_Data; } }
    }
}
